<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>订单历史</title>
</head>
<body>
	<section class="banner position-relative" id="home">
		<jsp:include page="../Header_act.jsp" />


		<div class="container">
			<div class="banner-text">
				<div class="slider-info">
					<div class="agileinfo-logo mt-lg-5">
						<h2>
							CDMS—— <br> 同城配送系统
						</h2>
					</div>
				</div>
			</div>
		</div>
	</section>
	<div class="col-md-12 column" style="width: 100%; text-align: center">
	<table border="1" style="width: 100%; text-align: center">
		<tr>
			<th>运单号</th>
			<th>接单地</th>
			<th>接单地联系电话</th>
			<th>目的地</th>
			<th>目的地联系电话</th>
			<th>费用</th>
			<th>接单时间</th>
			<th>订单状态</th>
			<th>完成时间</th>
		</tr>
		 <c:forEach items="${paginationSupport.items}" var="order" ><!-- 注意语法  -->
			<tr>
				<td>${order.orderId}</td>
				<td>${order.receiveAddress}</td>
				<td>${order.receivePhone}</td>
				<td>${order.deliverAddress}</td>
				<td>${order.deliverPhone}</td>
				<td>${order.cost}</td>
				<td><fmt:formatDate value="${order.receiveTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
				<c:if test="${order.state == 1}">
					<td>配送中</td>
					<td>未完成</td>
				</c:if>
				<c:if test="${order.state == 2}">
					<td>配送完成</td>
					<td><fmt:formatDate value="${order.finishTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
				</c:if>
			</tr>
		</c:forEach>
	</table>
    	每页${paginationSupport.pageSize}条记录，  第${paginationSupport.currentPageNo}/${paginationSupport.totalPageCount}页,共${paginationSupport.totalCount}条记录
      <c:if test="${paginationSupport.previousPage}">
      	<a href="<c:url value="/sender/myOrder?pageNo=${paginationSupport.currentPageNo-1}" />" >上一页</a> 
      </c:if>
      <c:if test="${paginationSupport.nextPage}">
      	<a href="<c:url value="/sender/myOrder?pageNo=${paginationSupport.currentPageNo+1}" />" >下一页</a>
      </c:if>
      </div>
      <jsp:include page="../Footer_act.jsp" />
</body>
</html>